package cn.shutdown.demo.thread.suspend.lock02;

/**
 * @author jiangwujie
 * @date 2021/8/8
 */
public class SynchronizedObject {
    public synchronized void printString() {
        System.out.println("begin");
        if (Thread.currentThread().getName().equals("a")) {
            System.out.println("a线程暂停了");
            Thread.currentThread().suspend();
        }
        System.out.println("end");
    }
}
